package file;

import java.io.File;

public class ShowDir {
	
	public static void showDir(File file){
		if(file.isFile()){
			System.out.println(file.getName()+" f ");
		}else{
			System.out.println(file.getName()+" d ");
			File[] file2 = file.listFiles();
			for (File file3 : file2) {
				showDir(file3);
			}
		}
	}
	
	public static void main(String[] args) {
		showDir(new File("d:\\a"));
	}
}
